package com.wang.config;

import io.minio.MinioClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Config {


    //问题：这里的MinioClient是单例的，有没有线程安全问题？答案：没有
    @Bean
    public MinioClient minioClient(){
        //链式编程，构造MinioClient对象
        return MinioClient.builder()
                .endpoint("http://192.168.236.129:9000")
                .credentials("admin","password")
                .build();
    }
}
